﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DCRF.Common.Connection
{
    public interface IConnector
    {
        string AttachEndPoint(Guid blockHandle, string serviceName);
        string AttachEndPoint(Guid blockHandle, string serviceName, object[] predefinedValues);
        string AttachEndPoint(IConnectorSubject target, string serviceName);
        string AttachEndPoint(object value);

        string ChainEndPoint(Guid blockHandle, string chainConnectorKey);

        //i think it is not logical to bin irrelevant connectors to eachother.
        //if the related connector has the same key and is defined in a parent container, it will
        //be invoked automatically. if not, it is meaningless to bind.
        //string AttachEndPoint(IConnector c);

        void DetachEndPoint(string key);
    }

    public interface IGlobalConnector : IConnector
    {
        List<object> ProcessRequestAll(params object[] args);
        object ProcessRequest(params object[] args);
        void Raise(params object[] args);
    }
}
